// pages/top/top.ts
Page({
data:{
  daohang:0,
  zhlist:[
    {
      id:0,
      imgurl:"/images/yunqiu.jpg",
      title:"基本功之运球",
      up:"运动小子",
      bfimgurl:"/images/bofang.png",
      number:"131"
    },
    {
      id:1,
      imgurl:"/images/打篮球.jpg",
      title:"篮球的技巧",
      up:"牛大堡",
      bfimgurl:"/images/bofang.png",
      number:"110"
    },
    {
      id:2,
      imgurl:"/images/跑步1.jpg",
      title:"慢跑真的好吗",
      up:"天霸哥",
      bfimgurl:"/images/bofang.png",
      number:"88"
    },
    {
      id:3,
      imgurl:"/images/钓鱼.jpg",
      title:"水中的世界",
      up:"水世界",
      bfimgurl:"/images/bofang.png",
      number:"68"
    }
  ],
  qllist:[
    {
      id:0,
      imgurl:"/images/yunqiu.jpg",
      title:"基本功之运球",
      up:"运动小子",
      bfimgurl:"/images/bofang.png",
      number:"78"
    }
  ],
  tjlist:[
    {
      id:2,
      imgurl:"/images/跑步1.jpg",
      title:"慢跑真的好吗",
      up:"天霸哥",
      bfimgurl:"/images/bofang.png",
      number:"88"
    }
  ],
  ydlist:[
    {
      id:1,
      imgurl:"/images/打篮球.jpg",
      title:"篮球的技巧",
      up:"牛大堡",
      bfimgurl:"/images/bofang.png",
      number:"110"
    }
  ],
  contentList:[]
},
itemTap:function (e)  {
var item=e.currentTarget.dataset.daohang;
this.setData({
  daohang:item
})
},
tiao:function(){
  var id=7
  wx.request({
    url: 'http://localhost:9000/video/getById?id='+id,
    method: "GET",
    
    success:(res)=>{
      this.setData({
        contentList: [res.data]
      })
    }
  })
  setTimeout(()=>{
    wx.navigateTo({
      url:`../display/display?data=${JSON.stringify(this.data.contentList)}`
    })
  },500)

}

})